package com.xiaoxi.exam.bean;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import com.thoughtworks.xstream.io.xml.XmlFriendlyNameCoder;
import java.nio.charset.StandardCharsets;

public class XzlXStream extends XStream {

  private static final String DOLLAR_REPLACEMENT = "-_";
  private static final String ESCAPE_REPLACEMENT = "_";

  public XzlXStream() {
    super(new DomDriver(StandardCharsets.UTF_8.name(),
        new XmlFriendlyNameCoder(DOLLAR_REPLACEMENT, ESCAPE_REPLACEMENT)));
  }
}
